home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utmisc2 / fiflb382.lha / tag.a < prev    next >
Text File  |  1996-05-13  |  3KB  |  140 lines

  1.  
  2.         ;    TAG.ASM
  3.         ;
  4.         ;    Library tag
  5.  
  6.  
  7.         section text,code
  8.  
  9.         xref    _LibInit
  10.         xref    _LibOpen
  11.         xref    _LibClose
  12.         xref    _LibExpunge
  13.         xref    _OpenFifo
  14.         xref    _CloseFifo
  15.         xref    _ReadFifo
  16.         xref    _WriteFifo
  17.         xref    _RequestFifo
  18.         xref    _BufSizeFifo
  19.  
  20.         xdef    _LibId
  21.         xdef    _LibName
  22.  
  23.         xdef    _Vectors
  24.         xdef    _BitTestSet
  25.  
  26.         moveq   #-1,D0
  27.         rts
  28.  
  29. InitDesc:   dc.w    $4AFC    ;RTC_MATCHWORD
  30.         dc.l    InitDesc    ;Pointer to beginning
  31.         dc.l    EndCode    ;Pointer to end of code
  32.         dc.b    0        ;flags (NO RTF_AUTOINIT)
  33.         dc.b    38        ;version
  34.         dc.b    9        ;NT_LIBRARY
  35.         dc.b    0        ;priority (doesn't matter)
  36.         dc.l    _LibName    ;Name of library
  37.         dc.l    _LibId    ;ID string (note CR-LF at end)
  38.         dc.l    Init    ;Pointer to init routine
  39.  
  40. _LibName:   dc.b    'fifo.library',0
  41. _LibId:     dc.b    'fifo.library 38.2 (8.5.96)',13,10,0
  42.         ds.l    0
  43.  
  44. _Vectors:
  45.         dc.l    ALibOpen
  46.         dc.l    ALibClose
  47.         dc.l    ALibExpunge
  48.         dc.l    0
  49.         dc.l    AOpenFifo
  50.         dc.l    ACloseFifo
  51.         dc.l    AReadFifo
  52.         dc.l    AWriteFifo
  53.         dc.l    ARequestFifo
  54.         dc.l    ABufSizeFifo
  55.         dc.l    -1
  56.  
  57. Init:        move.l  A0,-(sp)
  58.         jsr     _LibInit(pc)
  59.         addq.l  #4,sp
  60.         rts
  61.  
  62. ALibOpen
  63.         move.l  A6,-(sp)
  64.         move.l  D0,-(sp)
  65.         jsr     _LibOpen(pc)
  66.         addq.l  #8,sp
  67.         rts
  68.  
  69. ALibClose
  70.         move.l  A6,-(sp)
  71.         move.l  D0,-(sp)
  72.         jsr     _LibClose(pc)
  73.         addq.l  #8,sp
  74.         rts
  75.  
  76. ALibExpunge
  77.         move.l  A6,-(sp)
  78.         move.l  D0,-(sp)
  79.         jsr     _LibExpunge(pc)
  80.         addq.l  #8,sp
  81.         rts
  82.  
  83.         ;    ------------------------ LIBRARY CALLS -----------------
  84.         ;
  85.         ;    OpenFifo(name:D0, size:D1, flags:A0)  (size must be a power of 2)
  86. AOpenFifo
  87.         movem.l D0/D1/A0,-(sp)
  88.         jsr     _OpenFifo(pc)
  89.         lea     12(sp),sp
  90.         rts
  91.  
  92.         ;    CloseFifo(fifo:D0, flags:D1)
  93. ACloseFifo
  94.         move.l  D1,-(sp)
  95.         move.l  D0,-(sp)
  96.         jsr     _CloseFifo(pc)
  97.         addq.l  #8,sp
  98.         rts
  99.  
  100.         ;    ReadFifo(fifo:D0, buf:D1, bytes:A0)
  101. AReadFifo
  102.         movem.l D0/D1/A0,-(sp)
  103.         jsr     _ReadFifo(pc)
  104.         lea     12(sp),sp
  105.         rts
  106.  
  107.         ;    WriteFifo(fifo:D0, buf:D1, bytes:A0)
  108. AWriteFifo
  109.         movem.l D0/D1/A0,-(sp)
  110.         jsr     _WriteFifo(pc)
  111.         lea     12(sp),sp
  112.         rts
  113.  
  114.         ;    RequestFifo(fifo:D0, msg:D1, req:A0)
  115. ARequestFifo
  116.         movem.l D0/D1/A0,-(sp)
  117.         jsr     _RequestFifo(pc)
  118.         lea     12(sp),sp
  119.         rts
  120.  
  121.         ;    BufSizeFifo(fifo:D0)
  122. ABufSizeFifo
  123.         move.l  D0,-(sp)
  124.         jsr     _BufSizeFifo(pc)
  125.         addq.l  #4,sp
  126.         rts
  127.  
  128.         ;    BitTestSet(addr,bitno)
  129. _BitTestSet
  130.         move.l  4(sp),A0
  131.         move.w  10(sp),D0
  132.         bset.b  D0,(A0)
  133.         sne     D0
  134.         ext.w   D0
  135.         rts
  136.  
  137. EndCode:
  138.  
  139.         END
  140.